/**
 * File:   Node.java
 * Author: Gvennet
 */
package dht.emulator;

import java.util.List;

/** Defines the interface of a node in the distributed hash table. */
public interface Node
{

    /**
     * Returns the identifier of the node.
     *
     * @return the identifier of the node.
     */
    Identifier getIdentifier();


    void init();


    int getQuality();

    int getQuality(Node sender);


    List<Node> getNodes();

    List<Node> getNodes(Identifier identifier);

    List<Node> getNodes(Identifier identifier, Node sender);


    String getValue(Identifier key);

    String getValue(Identifier key, Node sender);

    void putValue(Identifier key, String value);

    void putValue(Identifier key, String value, Node sender);
}
